<html>
<head>
  <meta charset="utf-8">
  <link rel="icon" href="*{/images/favicon.ico}" type="image/x-icon" />
  <meta http-equiv="P3P" content="CP='NOI NID'">
  <meta http-equiv="_broadcast_from_" Content="1" />
  <script type="text/javascript" src="*{/js/jquery.js}"></script>
  <script type="text/javascript" src="*{/js/func.js}"></script>
  <script type="text/javascript" src="*{/js/base64.js}"></script>
	<title>项目脚本代码管理</title>
<style>
div{margin-top:30px;}
.input1{width:400px;}
</style>
</head>
<body>
<div style="margin-left:20px;margin-top:30px;">
	<div style="font-weight:bold;">
		创建项目：
	</div>  
	<div>
		<input type="hidden" id="type" value="1" />
		<input type="hidden" id="is_new" value="1" />
		项目编号：<input type="text" id="code" class="input1" /><br /><br />
		项目名称：<input type="text" id="name" class="input1" /><br /><br />
		项目说明：<input type="text" id="explain" class="input1" /><br /><br />
		密　　钥：<input type="text" readonly="readonly" id="key" class="input1" style="background-color:#F5DEB3;color:#00008B;" /></br />
	    <input type="button" value="提交" id="cproj_bt" style="margin-left:200px;margin-top:30px;"/>
	</div>
</div>
<script type="text/javascript">
//bind event
$("#cproj_bt").bind("click",doCreateProject);

//create project
function doCreateProject(){
	var code = $("#code").val();
	if(!code){
		alert("需要输入项目编号");
		$("#code").focus();
		return false;
	}
	var name = $("#name").val();
	if(!name){
		alert("需要输入项目名称");
		$("#name").focus();
		return false;
	}
	var dataJson = getJson("*{/CN000005.ha}","code="+code+"&name="+name+"&explain="+urlEncodePro(explain = $("#explain").val()));
	if(dataJson.status<0){
		alert(dataJson.msg);
	}
	$("#key").val(dataJson.value);
}
</script>
</body>
</html>